From cca769c75b9421f8ef5090848cea6162ccd85ba7 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Wed, 8 Feb 2017 09:42:29 +0100
Subject: [PATCH 1/1] add option to hide nonstandard server warning

Signed-off-by: Christian Hesse <mail@eworm.de>
---
 backend/wbprivate/workbench/wb_context.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/backend/wbprivate/workbench/wb_context.cpp b/backend/wbprivate/workbench/wb_context.cpp
index f06ff99..f89006b 100644
--- a/backend/wbprivate/workbench/wb_context.cpp
+++ b/backend/wbprivate/workbench/wb_context.cpp
@@ -3038,7 +3038,7 @@ std::shared_ptr<SqlEditorForm> WBContext::add_new_query_window(const db_mgmt_Con
         logError("Unsupported server version: %s %s\n", form->connection_details()["dbmsProductName"].c_str(),
                  form->connection_details()["dbmsProductVersion"].c_str());
 
-        if (mforms::Utilities::show_warning(
+        if (mforms::Utilities::show_message_and_remember(
               base::strfmt("Connection Warning (%s)", targetConnection->name().c_str()),
               base::strfmt(
                 "Incompatible/nonstandard server version or connection protocol detected (%s).\n\n"
@@ -3046,7 +3046,8 @@ std::shared_ptr<SqlEditorForm> WBContext::add_new_query_window(const db_mgmt_Con
                 "properly since the database is not fully compatible with the supported versions of MySQL.\n\n"
                 "MySQL Workbench is developed and tested for MySQL Server versions 5.1, 5.5, 5.6 and 5.7",
                 bec::sanitize_server_version_number(form->connection_details()["dbmsProductVersion"]).c_str()),
-              "Continue Anyway", "Cancel") != mforms::ResultOk) {
+              "Continue Anyway", "Cancel", "", "wb.supported_server_check.suppress_warning",
+              "Don't show this message again") != mforms::ResultOk) {
           _frontendCallbacks->show_status_text(_("Unsupported server"));
           return SqlEditorForm::Ref();
         }
-- 
2.11.1

